home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpconnect / nsIJSContextStack.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  10KB  |  316 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIJSContextStack.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIJSContextStack_h__
  6. #define __gen_nsIJSContextStack_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsIJSContextStack */
  19. #define NS_IJSCONTEXTSTACK_IID_STR "c67d8270-3189-11d3-9885-006008962422"
  20.  
  21. #define NS_IJSCONTEXTSTACK_IID \
  22.   {0xc67d8270, 0x3189, 0x11d3, \
  23.     { 0x98, 0x85, 0x00, 0x60, 0x08, 0x96, 0x24, 0x22 }}
  24.  
  25. class NS_NO_VTABLE nsIJSContextStack : public nsISupports {
  26.  public: 
  27.  
  28.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJSCONTEXTSTACK_IID)
  29.  
  30.   /* readonly attribute PRInt32 count; */
  31.   NS_IMETHOD GetCount(PRInt32 *aCount) = 0;
  32.  
  33.   /* JSContext peek (); */
  34.   NS_IMETHOD Peek(JSContext * *_retval) = 0;
  35.  
  36.   /* JSContext pop (); */
  37.   NS_IMETHOD Pop(JSContext * *_retval) = 0;
  38.  
  39.   /* void push (in JSContext cx); */
  40.   NS_IMETHOD Push(JSContext * cx) = 0;
  41.  
  42. };
  43.  
  44. /* Use this macro when declaring classes that implement this interface. */
  45. #define NS_DECL_NSIJSCONTEXTSTACK \
  46.   NS_IMETHOD GetCount(PRInt32 *aCount); \
  47.   NS_IMETHOD Peek(JSContext * *_retval); \
  48.   NS_IMETHOD Pop(JSContext * *_retval); \
  49.   NS_IMETHOD Push(JSContext * cx); 
  50.  
  51. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  52. #define NS_FORWARD_NSIJSCONTEXTSTACK(_to) \
  53.   NS_IMETHOD GetCount(PRInt32 *aCount) { return _to GetCount(aCount); } \
  54.   NS_IMETHOD Peek(JSContext * *_retval) { return _to Peek(_retval); } \
  55.   NS_IMETHOD Pop(JSContext * *_retval) { return _to Pop(_retval); } \
  56.   NS_IMETHOD Push(JSContext * cx) { return _to Push(cx); } 
  57.  
  58. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  59. #define NS_FORWARD_SAFE_NSIJSCONTEXTSTACK(_to) \
  60.   NS_IMETHOD GetCount(PRInt32 *aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCount(aCount); } \
  61.   NS_IMETHOD Peek(JSContext * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Peek(_retval); } \
  62.   NS_IMETHOD Pop(JSContext * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Pop(_retval); } \
  63.   NS_IMETHOD Push(JSContext * cx) { return !_to ? NS_ERROR_NULL_POINTER : _to->Push(cx); } 
  64.  
  65. #if 0
  66. /* Use the code below as a template for the implementation class for this interface. */
  67.  
  68. /* Header file */
  69. class nsJSContextStack : public nsIJSContextStack
  70. {
  71. public:
  72.   NS_DECL_ISUPPORTS
  73.   NS_DECL_NSIJSCONTEXTSTACK
  74.  
  75.   nsJSContextStack();
  76.  
  77. private:
  78.   ~nsJSContextStack();
  79.  
  80. protected:
  81.   /* additional members */
  82. };
  83.  
  84. /* Implementation file */
  85. NS_IMPL_ISUPPORTS1(nsJSContextStack, nsIJSContextStack)
  86.  
  87. nsJSContextStack::nsJSContextStack()
  88. {
  89.   /* member initializers and constructor code */
  90. }
  91.  
  92. nsJSContextStack::~nsJSContextStack()
  93. {
  94.   /* destructor code */
  95. }
  96.  
  97. /* readonly attribute PRInt32 count; */
  98. NS_IMETHODIMP nsJSContextStack::GetCount(PRInt32 *aCount)
  99. {
  100.     return NS_ERROR_NOT_IMPLEMENTED;
  101. }
  102.  
  103. /* JSContext peek (); */
  104. NS_IMETHODIMP nsJSContextStack::Peek(JSContext * *_retval)
  105. {
  106.     return NS_ERROR_NOT_IMPLEMENTED;
  107. }
  108.  
  109. /* JSContext pop (); */
  110. NS_IMETHODIMP nsJSContextStack::Pop(JSContext * *_retval)
  111. {
  112.     return NS_ERROR_NOT_IMPLEMENTED;
  113. }
  114.  
  115. /* void push (in JSContext cx); */
  116. NS_IMETHODIMP nsJSContextStack::Push(JSContext * cx)
  117. {
  118.     return NS_ERROR_NOT_IMPLEMENTED;
  119. }
  120.  
  121. /* End of implementation class template. */
  122. #endif
  123.  
  124.  
  125. /* starting interface:    nsIJSContextStackIterator */
  126. #define NS_IJSCONTEXTSTACKITERATOR_IID_STR "c7e6b7aa-fc12-4ca7-b140-98c38b698961"
  127.  
  128. #define NS_IJSCONTEXTSTACKITERATOR_IID \
  129.   {0xc7e6b7aa, 0xfc12, 0x4ca7, \
  130.     { 0xb1, 0x40, 0x98, 0xc3, 0x8b, 0x69, 0x89, 0x61 }}
  131.  
  132. class NS_NO_VTABLE nsIJSContextStackIterator : public nsISupports {
  133.  public: 
  134.  
  135.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJSCONTEXTSTACKITERATOR_IID)
  136.  
  137.   /**
  138.      * Resets this iterator to the beginning of this thread's stack.
  139.      */
  140.   /* void reset (in nsIJSContextStack stack); */
  141.   NS_IMETHOD Reset(nsIJSContextStack *stack) = 0;
  142.  
  143.   /**
  144.      * Returns true if this iterator is at the end of its stack's contexts.
  145.      * @throws NS_ERROR_NOT_INITIALIZED If there has not been a previous call
  146.      *         to reset.
  147.      */
  148.   /* boolean done (); */
  149.   NS_IMETHOD Done(PRBool *_retval) = 0;
  150.  
  151.   /**
  152.      * Returns the prev JSContext off of stack. Note that because we're 
  153.      * iterating over a stack, this value would be the next popped value.
  154.      *
  155.      * @throws NS_ERROR_NOT_INITIALIZED If there has not been a previous call
  156.      *         to reset.
  157.      * @throws NS_ERROR_NOT_AVAILABLE if already at the end.
  158.      */
  159.   /* JSContext prev (); */
  160.   NS_IMETHOD Prev(JSContext * *_retval) = 0;
  161.  
  162. };
  163.  
  164. /* Use this macro when declaring classes that implement this interface. */
  165. #define NS_DECL_NSIJSCONTEXTSTACKITERATOR \
  166.   NS_IMETHOD Reset(nsIJSContextStack *stack); \
  167.   NS_IMETHOD Done(PRBool *_retval); \
  168.   NS_IMETHOD Prev(JSContext * *_retval); 
  169.  
  170. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  171. #define NS_FORWARD_NSIJSCONTEXTSTACKITERATOR(_to) \
  172.   NS_IMETHOD Reset(nsIJSContextStack *stack) { return _to Reset(stack); } \
  173.   NS_IMETHOD Done(PRBool *_retval) { return _to Done(_retval); } \
  174.   NS_IMETHOD Prev(JSContext * *_retval) { return _to Prev(_retval); } 
  175.  
  176. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  177. #define NS_FORWARD_SAFE_NSIJSCONTEXTSTACKITERATOR(_to) \
  178.   NS_IMETHOD Reset(nsIJSContextStack *stack) { return !_to ? NS_ERROR_NULL_POINTER : _to->Reset(stack); } \
  179.   NS_IMETHOD Done(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Done(_retval); } \
  180.   NS_IMETHOD Prev(JSContext * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Prev(_retval); } 
  181.  
  182. #if 0
  183. /* Use the code below as a template for the implementation class for this interface. */
  184.  
  185. /* Header file */
  186. class nsJSContextStackIterator : public nsIJSContextStackIterator
  187. {
  188. public:
  189.   NS_DECL_ISUPPORTS
  190.   NS_DECL_NSIJSCONTEXTSTACKITERATOR
  191.  
  192.   nsJSContextStackIterator();
  193.  
  194. private:
  195.   ~nsJSContextStackIterator();
  196.  
  197. protected:
  198.   /* additional members */
  199. };
  200.  
  201. /* Implementation file */
  202. NS_IMPL_ISUPPORTS1(nsJSContextStackIterator, nsIJSContextStackIterator)
  203.  
  204. nsJSContextStackIterator::nsJSContextStackIterator()
  205. {
  206.   /* member initializers and constructor code */
  207. }
  208.  
  209. nsJSContextStackIterator::~nsJSContextStackIterator()
  210. {
  211.   /* destructor code */
  212. }
  213.  
  214. /* void reset (in nsIJSContextStack stack); */
  215. NS_IMETHODIMP nsJSContextStackIterator::Reset(nsIJSContextStack *stack)
  216. {
  217.     return NS_ERROR_NOT_IMPLEMENTED;
  218. }
  219.  
  220. /* boolean done (); */
  221. NS_IMETHODIMP nsJSContextStackIterator::Done(PRBool *_retval)
  222. {
  223.     return NS_ERROR_NOT_IMPLEMENTED;
  224. }
  225.  
  226. /* JSContext prev (); */
  227. NS_IMETHODIMP nsJSContextStackIterator::Prev(JSContext * *_retval)
  228. {
  229.     return NS_ERROR_NOT_IMPLEMENTED;
  230. }
  231.  
  232. /* End of implementation class template. */
  233. #endif
  234.  
  235.  
  236. /* starting interface:    nsIThreadJSContextStack */
  237. #define NS_ITHREADJSCONTEXTSTACK_IID_STR "a1339ae0-05c1-11d4-8f92-0010a4e73d9a"
  238.  
  239. #define NS_ITHREADJSCONTEXTSTACK_IID \
  240.   {0xa1339ae0, 0x05c1, 0x11d4, \
  241.     { 0x8f, 0x92, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}
  242.  
  243. class NS_NO_VTABLE nsIThreadJSContextStack : public nsIJSContextStack {
  244.  public: 
  245.  
  246.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITHREADJSCONTEXTSTACK_IID)
  247.  
  248.   /* attribute JSContext safeJSContext; */
  249.   NS_IMETHOD GetSafeJSContext(JSContext * *aSafeJSContext) = 0;
  250.   NS_IMETHOD SetSafeJSContext(JSContext * aSafeJSContext) = 0;
  251.  
  252. };
  253.  
  254. /* Use this macro when declaring classes that implement this interface. */
  255. #define NS_DECL_NSITHREADJSCONTEXTSTACK \
  256.   NS_IMETHOD GetSafeJSContext(JSContext * *aSafeJSContext); \
  257.   NS_IMETHOD SetSafeJSContext(JSContext * aSafeJSContext); 
  258.  
  259. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  260. #define NS_FORWARD_NSITHREADJSCONTEXTSTACK(_to) \
  261.   NS_IMETHOD GetSafeJSContext(JSContext * *aSafeJSContext) { return _to GetSafeJSContext(aSafeJSContext); } \
  262.   NS_IMETHOD SetSafeJSContext(JSContext * aSafeJSContext) { return _to SetSafeJSContext(aSafeJSContext); } 
  263.  
  264. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  265. #define NS_FORWARD_SAFE_NSITHREADJSCONTEXTSTACK(_to) \
  266.   NS_IMETHOD GetSafeJSContext(JSContext * *aSafeJSContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSafeJSContext(aSafeJSContext); } \
  267.   NS_IMETHOD SetSafeJSContext(JSContext * aSafeJSContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSafeJSContext(aSafeJSContext); } 
  268.  
  269. #if 0
  270. /* Use the code below as a template for the implementation class for this interface. */
  271.  
  272. /* Header file */
  273. class nsThreadJSContextStack : public nsIThreadJSContextStack
  274. {
  275. public:
  276.   NS_DECL_ISUPPORTS
  277.   NS_DECL_NSITHREADJSCONTEXTSTACK
  278.  
  279.   nsThreadJSContextStack();
  280.  
  281. private:
  282.   ~nsThreadJSContextStack();
  283.  
  284. protected:
  285.   /* additional members */
  286. };
  287.  
  288. /* Implementation file */
  289. NS_IMPL_ISUPPORTS1(nsThreadJSContextStack, nsIThreadJSContextStack)
  290.  
  291. nsThreadJSContextStack::nsThreadJSContextStack()
  292. {
  293.   /* member initializers and constructor code */
  294. }
  295.  
  296. nsThreadJSContextStack::~nsThreadJSContextStack()
  297. {
  298.   /* destructor code */
  299. }
  300.  
  301. /* attribute JSContext safeJSContext; */
  302. NS_IMETHODIMP nsThreadJSContextStack::GetSafeJSContext(JSContext * *aSafeJSContext)
  303. {
  304.     return NS_ERROR_NOT_IMPLEMENTED;
  305. }
  306. NS_IMETHODIMP nsThreadJSContextStack::SetSafeJSContext(JSContext * aSafeJSContext)
  307. {
  308.     return NS_ERROR_NOT_IMPLEMENTED;
  309. }
  310.  
  311. /* End of implementation class template. */
  312. #endif
  313.  
  314.  
  315. #endif /* __gen_nsIJSContextStack_h__ */
  316.